package com.ruoyi.grape.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.grape.mapper.GrapeMsgMapper;
import com.ruoyi.grape.domain.GrapeMsg;
import com.ruoyi.grape.service.IGrapeMsgService;

/**
 * 线上留言Service业务层处理
 * 
 * @author ld
 * @date 2023-11-18
 */
@Service
public class GrapeMsgServiceImpl implements IGrapeMsgService 
{
    @Autowired
    private GrapeMsgMapper grapeMsgMapper;

    /**
     * 查询线上留言
     * 
     * @param msgId 线上留言主键
     * @return 线上留言
     */
    @Override
    public GrapeMsg selectGrapeMsgByMsgId(Long msgId)
    {
        return grapeMsgMapper.selectGrapeMsgByMsgId(msgId);
    }

    /**
     * 查询线上留言列表
     * 
     * @param grapeMsg 线上留言
     * @return 线上留言
     */
    @Override
    public List<GrapeMsg> selectGrapeMsgList(GrapeMsg grapeMsg)
    {
        return grapeMsgMapper.selectGrapeMsgList(grapeMsg);
    }

    /**
     * 新增线上留言
     * 
     * @param grapeMsg 线上留言
     * @return 结果
     */
    @Override
    public int insertGrapeMsg(GrapeMsg grapeMsg)
    {
        return grapeMsgMapper.insertGrapeMsg(grapeMsg);
    }

    /**
     * 修改线上留言
     * 
     * @param grapeMsg 线上留言
     * @return 结果
     */
    @Override
    public int updateGrapeMsg(GrapeMsg grapeMsg)
    {
        return grapeMsgMapper.updateGrapeMsg(grapeMsg);
    }

    /**
     * 批量删除线上留言
     * 
     * @param msgIds 需要删除的线上留言主键
     * @return 结果
     */
    @Override
    public int deleteGrapeMsgByMsgIds(Long[] msgIds)
    {
        return grapeMsgMapper.deleteGrapeMsgByMsgIds(msgIds);
    }

    /**
     * 删除线上留言信息
     * 
     * @param msgId 线上留言主键
     * @return 结果
     */
    @Override
    public int deleteGrapeMsgByMsgId(Long msgId)
    {
        return grapeMsgMapper.deleteGrapeMsgByMsgId(msgId);
    }
}
